package top.jle.wx.proxy.domain.invoice;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Schema(title="发票信息")
@Getter
@Setter
public class Invoice {

    @Schema(title="抬头")
    private String title;
    @Schema(title="金额，以分为单位")
    private int fee = 0;
    @Schema(title="开票时间，时间戳10位,默认当前时间")
    private Long billing_time = System.currentTimeMillis()/1000;
    @Schema(title="发票代码")
    private String billing_no;
    @Schema(title="发票号码")
    private String billing_code;
    @Schema(title="不含税金额，以分为单位")
    private int fee_without_tax=0;
    @Schema(title="税额")
    private int tax;
    @Schema(title="发票PDF媒体ID，通过上传PDF接口获取")
    private String s_pdf_media_id;
    @Schema(title="校验码，发票pdf右上角，开票日期下的校验码")
    private String check_code;

    @Schema(title="购方税号，企业抬头必填")
    private String buyer_number;
    @Schema(title="开票人")
    private String maker;
    @Schema(title="收款人")
    private String cashier;

    private List<DetailInfo> info;

    @Schema(title="发票明细")
    @Getter
    @Setter
    static class DetailInfo{
        @Schema(title="项目名称")
        private String name;
        @Schema(title="数量")
        private int num;
        @Schema(title="单位")
        private String unit;
        @Schema(title="单价,以分为点位")
        private int price;

    }
}
